CAPTCHA = require("../../yun/captcha")
chalk = require('chalk')

_new = (func, name)->
    ->
        try
            return func.apply @, arguments
        catch err
            console.log err
            console.log chalk.red "自动测试模式 ：禁用 #{name} 验证码校验检测"
            return

do ->
    console.log chalk.red "自动测试模式 ：禁验证码校验检测"
    for i of CAPTCHA
        func = CAPTCHA[i]
        CAPTCHA[i] = _new(func, i)

